<template>
  <div>
    <form @submit.prevent="rangeform">
      <div class="basic-content">
        <div class="row">
          <div class="col-lg-4">
            <div class="form-group">
              <label for="productname">客户简称</label>
              <b-form-input
                for="text"
                v-model="basicContent.name"
                placeholder="请输入客户简称"
              ></b-form-input>
            </div>
          </div>
          <div class="col-lg-4">
            <div class="form-group">
              <label for="price">法定代表人</label>
              <b-form-input
                for="text"
                v-model="basicContent.address"
                placeholder="请输入法定代表人"
              ></b-form-input>
            </div>
          </div>
          <div class="col-lg-4">
            <div class="form-group">
              <label for="manufacturerbrand">客户全称</label>
              <b-form-input
                for="text"
                v-model="basicContent.address"
                placeholder="请输入客户全称"
              ></b-form-input>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-lg-3">
            <div class="form-group">
              <label for="price">工商信用代码</label>
              <b-form-input
                for="text"
                v-model="basicContent.address"
                placeholder="请输入工商信用代码"
              ></b-form-input>
            </div>
          </div>
          <div class="col-md-3">
            <div class="form-group">
              <label class="control-label">客户联系人</label>
              <b-form-input
                for="text"
                v-model="basicContent.address"
                placeholder="请输入客户联系人"
              ></b-form-input>
            </div>
          </div>
          <div class="col-md-3">
            <div class="form-group">
              <label class="control-label">appid</label>
              <b-form-input
                for="text"
                value=""
                placeholder="系统自动创建"
              ></b-form-input>
            </div>
          </div>
          <div class="col-md-3">
            <div class="form-group">
              <label class="control-label">客户联系方式</label>
              <b-form-input
                for="text"
                v-model="basicContent.address"
                placeholder="请输入客户联系方式"
              ></b-form-input>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-4">
            <div class="form-group">
              <label class="control-label">appsecret</label>
              <b-form-input
                for="text"
                value=""
                placeholder="系统自动创建"
              ></b-form-input>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="control-label">公司地址</label>
              <b-form-input
                for="text"
                v-model="basicContent.address"
                placeholder="请输入公司地址"
              ></b-form-input>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="control-label">合作状态</label>
              <multiselect
                v-model="cooperation"
                :options="optionState"
                placeholder="合作状态"
              ></multiselect>
            </div>
          </div>
        </div>
        <div class="form-group">
          <label for="productdesc">公司简介</label>
          <textarea class="form-control" id="productdesc" rows="5"></textarea>
        </div>
      </div>
      <div class="form-group mb-0">
        <div>
          <b-button
            type="submit"
            class="btn btn-primary"
            variant="success"
            @click="makeToast('success')"
            >提交</b-button
          >
          <!-- <button type="submit" class="btn btn-primary" style="float: right">
            添加种子
          </button> -->
        </div>
      </div>
    </form>
  </div>
</template>

<script>
import Multiselect from "vue-multiselect";
export default {
  components: {
    Multiselect,
  },
  data() {
    return {
      items: [
        {
          text: "信源管理",
          url: "/seed",
        },{
          text: "添加信源",
          url: "/",
        }
      ],
      submit: false,
      // 基本信息
      basicContent: {
        name: "",
        address: "",
      },
      optionState: ["高级", "中级", "低级"],
      cooperation: '',
    };
  },
  methods: {
    rangeform() {
      this.submit = true;
      // stop here if form is invalid
      this.$v.$touch();
    },
    makeToast(variant = null) {
      this.$bvToast.toast("Toast body content", {
        title: `Toast ${variant || "default"}`,
        variant: variant,
        solid: true,
      });
    },
  },
};
</script>

<style>
label{
  font-weight: normal;
}
</style>